import Vue from "vue";
import VueRouter from "vue-router";
import { all_routers } from './all_routers';

Vue.use(VueRouter);

export const constantRouterMap = [{
    path: '/login',
    component: () => import('@/views/login'),
    hidden: true
},{
    path: '/error',
    hidden: true,
    component: () => import('@/views/error'),
}];

export default new VueRouter({
    scrollBehavior: () => ({
        y: 0
    }),
    fallback: false,
    routes: constantRouterMap
});
export const asyncRouterMap = all_routers();
